package com.dapeng.cleardatabackend.model.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.dapeng.cleardatabackend.model.enums.GraphStatusEnum;
import com.dapeng.cleardatabackend.model.enums.IsEnum;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * 图谱表
 *
 * @author dapeng
 * @TableName graph
 */
@TableName(value = "graph")
@Data
public class Graph implements Serializable {
    /**
     * id
     */
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private Long id;

    /**
     * 图谱名称
     */
    @TableField(value = "name")
    private String name;

    /**
     * 图谱描述
     */
    @TableField(value = "description")
    private String description;

    /**
     * 用户id
     */
    @TableField(value = "userId")
    private Long userId;

    /**
     * 是否公开 0-私有 1-公开
     */
    @TableField(value = "isPublic")
    private IsEnum isPublic;

    /**
     * 是否发布 0-未发布 1-发布
     */
    @TableField(value = "isPublish")
    private IsEnum isPublish;

    /**
     * 状态 0-创建成功 1-正在创建 2-创建失败
     */
    @TableField(value = "status")
    private GraphStatusEnum status;

    /**
     * 创建时间
     */
    @TableField(value = "createTime")
    private Date createTime;

    /**
     * 更新时间
     */
    @TableField(value = "updateTime")
    private Date updateTime;

    /**
     * 是否删除
     */
    @TableField(value = "isDelete", select = false)
    @TableLogic
    private Integer isDelete;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}